﻿<Selection:SelectControl x:Class="jSLCore.Client.Presentation.Authorization.Managment.RolesList"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Selection="clr-namespace:jSLCore.Client.Presentation.BaseControl.Selection" xmlns:j="clr-namespace:jSLCore.Client.Presentation.Controls" xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" xmlns:Managment="clr-namespace:jSLCore.Client.Presentation.Authorization.Managment" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Icon="../../../Resources/Permissions.png" Title="Роли" AcceptButtonName="searchButton" MaxWidth="1024">
    <j:ImageGroupBox>
        <j:ImageGroupBox.Header>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Поиск:" VerticalAlignment="Center"/>
                <TextBox Width="150" x:Name="txt">
                </TextBox>
                <Button Content="Обновить" Name="searchButton"/>
                <TextBlock Text="   "/>
                <Button Content="Создать новую роль" Click="addRole_Clicked"/>
            </StackPanel>
        </j:ImageGroupBox.Header>
        <Selection:jSLGrid x:Name="grid" IsShowDetailsButtonVisible="True" ShowDetailsClicked="gotoRole_CLicked">
            <Selection:jSLGrid.Columns>
            <!--    <Controls:DataGridTemplateColumn>
                    <Controls:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <j:ImageButton Image="../../../Resources/delete.png" Margin="0" DataContext="{Binding}" Click="delete_Clicked"/>
                        </DataTemplate>
                    </Controls:DataGridTemplateColumn.CellTemplate>
                </Controls:DataGridTemplateColumn>-->
                <Selection:DataGridImageButtonColumn ButtonImage="../../../Resources/delete.png" Click="delete_Clicked" ButtonTooltip="Удалить..."/>
                <Controls:DataGridTextColumn Header="Название" Binding="{Binding Name}"/>
                <Controls:DataGridTextColumn Header="Родительские роли">
                	<Controls:DataGridTextColumn.Binding>
                        <Binding Path="BaseRoles">
                			<Binding.Converter>
                                <Managment:BaseRolesToStringConverter/>
                            </Binding.Converter>
                		</Binding>
                	</Controls:DataGridTextColumn.Binding>
                </Controls:DataGridTextColumn>
            </Selection:jSLGrid.Columns>
        </Selection:jSLGrid>
    </j:ImageGroupBox>
</Selection:SelectControl>
